import { request } from '@/utils/hsj/service/index'

// 查询行业列表
export function listIndustry(query) {
  return request({
    url: '/system/industry/list',
    method: 'get',
    params: query,
  })
}

// 查询行业列表（排除节点）
export function listIndustryExcludeChild(industryId) {
  return request({
    url: '/system/industry/list/exclude/' + industryId,
    method: 'get',
  })
}

// 查询行业详细
export function getIndustry(industryId) {
  return request({
    url: '/system/industry/' + industryId,
    method: 'get',
  })
}

// 新增行业
export function addIndustry(data) {
  return request({
    url: '/system/industry',
    method: 'post',
    data: data,
  })
}

// 修改行业
export function updateIndustry(data) {
  return request({
    url: '/system/industry',
    method: 'put',
    data: data,
  })
}

// 删除行业
export function del(industryId) {
  return request({
    url: '/system/industry/' + industryId,
    method: 'delete',
  })
}

// 查询行业下拉树结构
export function industryTreeSelect() {
  return request({
    url: '/system/industry/industryTree',
    method: 'get',
  })
}
